Adding flexibility to choose the time string suffix for output file names #660
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This PR allows the user to change the time used to set the filename when history files are written periodically using the diag_table.
The allowed options are "begin", "middle", and "end". If no option is present the default, "middle", will be used.
Fixes #626
How Has This Been Tested?
Passes diag_manager unit test.
"ocn_middle%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0", 0, "", "middle"
generates the files:
ocn_middle_0002_01_01_03.nc for time_bnds [0,6]
ocn_middle_0002_01_01_09.nc for time_bnds [6,12]
ocn_middle_0002_01_01_15.nc for time_bnds [12,18]
"ocn_begin%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0" 0, "", "begin"
generates the files:
ocn_begin_0002_01_01_00.nc for time_bnds [0,6]
ocn_begin_0002_01_01_06.nc for time_bnds [6,12]
ocn_begin_0002_01_01_12.nc for time_bnds [12,18]
"ocn_end%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0" 0, "", "end"
generates the files:
ocn_end_0002_01_01_06.nc for time_bnds [0,6]
ocn_end_0002_01_01_12.nc for time_bnds [6,12]
ocn_end_0002_01_01_18.nc for time_bnds [12,18]
"ocn_default%4yr%2mo%2dy%2hr", 6, "hours", 1, "hours", "time", 6, "hours", "2 1 1 0 0 0"
generates the files:
ocn_default_0002_01_01_03.nc for time_bnds [0,6]
ocn_default_0002_01_01_09.nc for time_bnds [6,12]
ocn_default_0002_01_01_15.nc for time_bnds [12,18]
AM4.1 runs with intel/debug on gaea still work.
Checklist:
make distcheck
passes